@directive dynamic status;
@var isAdd = shiro.hasPermission("fls.activity.add");
@var isEdit = shiro.hasPermission("fls.activity.edit");
@var isDel = shiro.hasPermission("fls.activity.delete");
@var content = {
<div class="panel panel-success">
    <div class="panel-body">
        <div id="userTable"></div>
        <script type="text/javascript">
            var statusOld = JSON.parse('${status}');
            var s = [{value: '', name: '-- 请选择状态 --'}];
            statusOld.forEach(function (item) {
                console.log(item);
                s.push({value: item.value, name: '-- ' + item.name + ' --'});
            });
            var setting = {
                dataUrl: '${ctxPath}/fls/activity/list',//数据加载地址
                addUrl: '${ctxPath}/fls/activity/add',//添加地址
                editUrl: '${ctxPath}/fls/activity/edit',//编辑地址
                delUrl: '${ctxPath}/fls/activity/delete',//删除数据地址
                isAddBtnIsShow: '${isAdd}' === 'true',
                addBtnText: '添加',
                isEditBtnIsShow: '${isEdit}' === 'true',
                editBtnText: '编辑',
                isDeleteBtnIsShow: '${isDel}' === 'true',
                deleteBtnText: '删除',
                toolbar: 'userToolbar',
                columns: [{checkbox: true},
                    {
                        field: 'name',
                        title: '名称',
                        align: 'center',
                        formatter: function (arg, obj) {
                            if ('${isEdit}' === 'true') {
                                return '<a href="javascript:void(0);" onclick="table.bootstrapTableExtension(\'edit\',\'' + setting.editUrl + '/' + obj.id + '\');">' + arg + '</a>';
                            } else {
                                return arg;
                            }
                        }
                    },
                    {
                        field: 'startingTime', title: '开始时间', align: 'center', sortable: true,
                        formatter: function (arg) {
                            return arg.slice(0, 10) + " " + arg.slice(11, 20);
                        }
                    },
                    {
                        field: 'endTime', title: '结束时间', align: 'center', sortable: true,
                        formatter: function (arg) {
                            return arg.slice(0, 10) + " " + arg.slice(11, 20);
                        }
                    },
                    {
                        field: 'addTime', title: '添加时间', align: 'center', sortable: true,
                        formatter: function (arg) {
                            return arg.slice(0, 10) + " " + arg.slice(11, 20);
                        }
                    },
                    {field: 'userName', title: '创建人', align: 'center', sortable: false},
                    {field: 'content', title: '内容', align: 'center', sortable: false,visible:false},
                    {field: 'statusName', title: '状态', align: 'center', sortable: false}
                ],
                otherSelects: [
                    {
                        isShow: true,
                        classes: 'form-control',
                        name: 'status',
                        id: 'status',
                        data: s
                    }
                ]
            };
            var table = $('#userTable').bootstrapTableExtension(setting);
        </script>
    </div>
</div>
@};
@layout('../../layout/_open_content.html',{content:content}){}